package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysRequestsFieldMapper;
import com.ruoyi.system.domain.SysRequestsField;
import com.ruoyi.system.service.ISysRequestsFieldService;

/**
 * 接口字段Service业务层处理
 * 
 * @author yql
 * @date 2023-09-19
 */
@Service
public class SysRequestsFieldServiceImpl implements ISysRequestsFieldService 
{
    @Autowired
    private SysRequestsFieldMapper sysRequestsFieldMapper;

    /**
     * 查询接口字段
     * 
     * @param id 接口字段主键
     * @return 接口字段
     */
    @Override
    public SysRequestsField selectSysRequestsFieldById(Long id)
    {
        return sysRequestsFieldMapper.selectSysRequestsFieldById(id);
    }

    /**
     * 查询接口字段列表
     * 
     * @param sysRequestsField 接口字段
     * @return 接口字段
     */
    @Override
    public List<SysRequestsField> selectSysRequestsFieldList(SysRequestsField sysRequestsField)
    {
        return sysRequestsFieldMapper.selectSysRequestsFieldList(sysRequestsField);
    }

    /**
     * 新增接口字段
     * 
     * @param sysRequestsField 接口字段
     * @return 结果
     */
    @Override
    public int insertSysRequestsField(SysRequestsField sysRequestsField)
    {
        sysRequestsField.setCreateTime(DateUtils.getNowDate());
        return sysRequestsFieldMapper.insertSysRequestsField(sysRequestsField);
    }

    /**
     * 修改接口字段
     * 
     * @param sysRequestsField 接口字段
     * @return 结果
     */
    @Override
    public int updateSysRequestsField(SysRequestsField sysRequestsField)
    {
        sysRequestsField.setUpdateTime(DateUtils.getNowDate());
        return sysRequestsFieldMapper.updateSysRequestsField(sysRequestsField);
    }

    /**
     * 批量删除接口字段
     * 
     * @param ids 需要删除的接口字段主键
     * @return 结果
     */
    @Override
    public int deleteSysRequestsFieldByIds(Long[] ids)
    {
        return sysRequestsFieldMapper.deleteSysRequestsFieldByIds(ids);
    }

    /**
     * 删除接口字段信息
     * 
     * @param id 接口字段主键
     * @return 结果
     */
    @Override
    public int deleteSysRequestsFieldById(Long id)
    {
        return sysRequestsFieldMapper.deleteSysRequestsFieldById(id);
    }
}
